<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>OOP in PHP</title>
<?php include("../im-message-exchange-adapter.php"); ?>
</head>
<body>
<?php
  $adapter = new ImMessageExchangeAdapter();

  // 每个required字段都必须填充, 否则服务端无法正常解析
  $message = new ImMessage();
  $message->seq_id = 0;
  $message->sender = 127646892;
  $message->receiver = 127646892;
  $message->timestamp = 0;
  $message->flags = 0x0200;
  $message->body = "php客户端测试消息<a href=\"http://bang.360.cn\">同城帮</a>";

  $res = $adapter->CreateMessage($message);

  print $res . "\n";
?>
</body>
</html>

